package Tests;

//STRING PROCESSING
//Frans Coenen, Monday 15 January 1999
//Department of Computer Science, The University of Liverpool, UK

import java.io.*; 
import java.util.*;

class StringProcessing
 {
 // Create BufferedReader class instance

 static InputStreamReader input = new InputStreamReader(System.in);
 static BufferedReader    keyboardInput = new BufferedReader(input);

 /* Main method  */

 public static void main(String[] args) throws IOException
     {
	// Get a string
	
     System.out.println("Input a string ");
	String data = keyboardInput.readLine();

	// Output number of characters in the line
	
	int numberCharacters = data.length();
	System.out.println("Number of characters = " +
				numberCharacters + "\n");
	
	// Output tokens
	
	for (int counter=0; counter < numberCharacters; counter++) {
	    char character = data.charAt(counter);
	    if (character == ',') System.out.println();	 
	    else System.out.print(character);
	    }	
	System.out.println("\n");    
	}
}     

